﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Quotation
{
    public sealed class OptionCPFlag : StrictFlagBase<char, OptionCPFlag>
    {
        private OptionCPFlag(char value) : base(value) { }

        public static readonly OptionCPFlag Call = new OptionCPFlag('C');

        public static readonly OptionCPFlag Put = new OptionCPFlag('P');

        /// <summary>
        /// 隐式类型转换
        /// </summary>
        /// <param name="value"></param>
        /// <returns></returns>
        public static implicit operator OptionCPFlag(char value)
        {
            OptionCPFlag rtn;
            OptionCPFlag.TryConvert(value, out rtn);
            return rtn;

        }
    }
}
